<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>商家信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">

    <meta http-equiv="Pragma"   content= "no-cache" /> 
    <meta http-equiv= "Cache-Control"   content= "no-cache" /> 
    <meta http-equiv= "Expires"   content= "0" />

    <link rel="stylesheet" href="/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/layui/style/admin.css" media="all" />
</head>

<body>
   <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
       <legend>微信支付配置</legend>

       <form class="layui-form" lay-filter="enterprise_wx_form" action="">
           <input type="hidden" id="id" name="id" th:value="${enterpriseInfo.id}"/>
           <div class="layui-form-item ">
               <label class="layui-form-label">结算费率</label>
               <div class="layui-input-block">
                   <input type="number" name="wxFinalRate" th:value="${enterpriseInfo.wxFinalRate}" placeholder="微信结算费率"
                          autocomplete="off" class="layui-input" lay-verify="number|FinalRate">
               </div>
           </div>

           <div class="layui-form-item ">
               <label class="layui-form-label" >补贴比例(默认填0)</label>
               <div class="layui-input-block">
                   <input type="number" name="wxSubsidyRate" th:value="${enterpriseInfo.wxSubsidyRate}"
                          placeholder="微信补贴比列" autocomplete="off" class="layui-input" lay-verify="number|SubsidyRate">
               </div>
           </div>
           <div class="layui-form-item ">
               <label class="layui-form-label">商户号</label>
               <div class="layui-input-block">
                   <input type="text" name="wxSubMchId" th:value="${enterpriseInfo.wxSubMchId}" placeholder="商户号"
                          autocomplete="off" class="layui-input">
               </div>
           </div>

           <div class="layui-form-item ">
               <label class="layui-form-label">公众号(非必填)</label>
               <div class="layui-input-block">
                   <input type="text" name="wxSubAppId" th:value="${enterpriseInfo.wxSubAppId}" placeholder="微信公众号ID"
                          autocomplete="off" class="layui-input">
               </div>
           </div>

           <div class="layui-form-item" sec:authorize="hasAnyRole('AGENCY_MANAGER')" th:if="${enterpriseInfo.wxSubMchId ==null || enterpriseInfo.wxSubMchId ==''}">
               <div class="layui-input-block">
                   <button class="layui-btn" lay-submit="" lay-filter="enterprise_form_wx_ok">提交</button>
               </div>
           </div>
       </form>
</fieldset>



   <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
       <legend>支付宝配置</legend>

       <form class="layui-form" lay-filter="enterprise_ali_form" action="">
           <input type="hidden"  name="id" th:value="${enterpriseInfo.id}"/>
           <div class="layui-form-item ">
               <label class="layui-form-label">结算费率</label>
               <div class="layui-input-block">
                   <input type="number" name="aliFinalRate" th:value="${enterpriseInfo.aliFinalRate}" placeholder="微信结算费率"
                          autocomplete="off" class="layui-input" lay-verify="number|FinalRate">
               </div>
           </div>

           <div class="layui-form-item ">
               <label class="layui-form-label" >补贴比例(默认填0)</label>
               <div class="layui-input-block">
                   <input type="number" name="aliSubsidyRate" th:value="${enterpriseInfo.aliSubsidyRate}"
                          placeholder="支付宝补贴" autocomplete="off" class="layui-input" lay-verify="number|SubsidyRate">
               </div>
           </div>
           <div class="layui-form-item ">
               <label class="layui-form-label">用户标识</label>
               <div class="layui-input-block">
                   <input type="text" name="aliUserId" th:value="${enterpriseInfo.aliUserId}" placeholder="商户号"
                          autocomplete="off" class="layui-input">
               </div>
           </div>

           <div class="layui-form-item" sec:authorize="hasAnyRole('AGENCY_MANAGER')" th:if="${enterpriseInfo.aliUserId ==null || enterpriseInfo.aliUserId ==''}">
               <div class="layui-input-block">
                   <button class="layui-btn" lay-submit="" lay-filter="enterprise_form_ali_ok">提交</button>
               </div>
           </div>

           <input type="hidden" style="width: 500px;" id="aliCallBackUrl" th:value="${enterpriseInfo.aliCallBackUrl}" >

       </form>

       <div class="layui-form-item"  th:if="${enterpriseInfo.aliUserId ==null || enterpriseInfo.aliUserId ==''}">
           <div class="layui-input-block">
               <button id="auth_btn" class="layui-btn" lay-filter="ali_auth_ar">获取支付宝授权码</button>
           </div>
       </div>

       <div class="face_qr"  style="display: none; margin: 0 15%">
           <span style="color: red;">请用商家支付宝扫码 勿重扫</span>
           <div id="authqr" style="width:200px; height:200px; margin-top:15px; "></div>
       </div>

   </fieldset>

<script type="text/javascript" src="/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript" src="/layui/layui.js"></script>
<script src="/js/qrcode.js"></script>
<script type="text/javascript" src="/js/enterprise/enterpriseinfo.js"></script>


</body>
</html>